package com.itheima.reggie.common;

/**
 * 存储一个线程过程中的用户id
 *      基于ThreadLocal进行封装的工具类
 */
public class BaseContext {

    public static ThreadLocal threadLocal = new ThreadLocal();

    public static void setId(Long id){
        threadLocal.set(id);
    }

    public static Long getId(){
        return (Long) threadLocal.get();
    }
}
